package com.tckdq.tcc.feign;

import com.tckdq.tcc.result.JsonResult;
import feign.Feign;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import javax.print.attribute.standard.Media;

@Component
public class MediaFeignFallbackFactory implements FallbackFactory<MediaFeign> {
    @Override
    public MediaFeign create(Throwable throwable) {
        return new MediaFeign() {
            @Override
            public JsonResult getByCourseId(Long courseId) {
                return JsonResult.error("获取视频失败");
            }
        };
    }
}
